import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'router/index.dart';
import 'stores/counter.dart';

void main() {
  runApp(ChangeNotifierProvider(
      create: (context) => Counter(),
      child: MaterialApp(
        // 路由组件的配置
        routes: RouterManager.routes,
        // 路由拦截配置
        onGenerateRoute: (settings) => RouterManager.generateRoute(settings),
        // 初始化的加载路由的路径
        initialRoute: '/',
      )));
}
